//
//  EventDetailViewController.h
//  Gruphoto
//
//  Created by Thao Nguyen Huy on 1/8/13.
//  Copyright (c) 2013 CNC Software. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "EventPhotoView.h"
#import <MessageUI/MessageUI.h>
#import "TableViewEventImages.h"

typedef enum {
    EventDetailTypeAllPhotos,
    EventDetailTypeFavorites,
    EventDetailTypeUsers
}EventDetailType;

@class GruphotoCameraViewController;
@class Event;

@interface EventDetailViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIActionSheetDelegate, MFMailComposeViewControllerDelegate, UIAlertViewDelegate> {
    UILabel *eventTitleLabel;
    UILabel *eventPassTimeLabel;
    UIImageView *authorAvatarImageView;
    UILabel *authorNameLabel;
    UILabel *numberOfLikesLabel;
    UILabel *numberOfPeoplesLabel;
    UILabel *numberOfPhotosLabel;
    UITableView *photoTableView;
    UITableView *userTableView;
    UIView *cameraView;
    
    GruphotoCameraViewController *cameraViewController;
    
    EventDetailType detailType;
    EventDetailMode detailMode;
    
    BOOL shouldShowTabbar;
    BOOL isDeleting;
    
    Event *event;
    TableViewEventImages *tableViewEventImages;
}

@property (nonatomic, retain) IBOutletCollection(UIButton) NSArray *detailButtons;
@property (nonatomic, retain) IBOutletCollection(UIView) NSArray *deviders;
@property (nonatomic, retain) IBOutlet UITableView *photoTableView;
@property (nonatomic, retain) IBOutlet UITableView *userTableView;
@property (nonatomic, retain) IBOutlet UILabel *eventTitleLabel;
@property (nonatomic, retain) IBOutlet UILabel *eventPassTimeLabel;
@property (nonatomic, retain) IBOutlet UIImageView *authorAvatarImageView;
@property (nonatomic, retain) IBOutlet UILabel *authorNameLabel;
@property (nonatomic, retain) IBOutlet UILabel *numberOfLikesLabel;
@property (nonatomic, retain) IBOutlet UILabel *numberOfPeoplesLabel;
@property (nonatomic, retain) IBOutlet UILabel *numberOfPhotosLabel;
@property (nonatomic, retain) IBOutlet UIView *cameraView;

@property (nonatomic, retain) GruphotoCameraViewController *cameraViewController;
@property (nonatomic, assign) EventDetailMode detailMode;
@property (nonatomic, assign) BOOL shouldShowTabbar;
@property (nonatomic, assign) BOOL isDeleting;

@property (nonatomic, assign) NSInteger eventIndex;

@property (nonatomic, retain) Event *event;
@property (nonatomic, retain) NSDictionary *eventDetail;


- (IBAction)backButtonPressed:(id)sender;
- (IBAction)detailButtonPressed:(id)sender;
- (IBAction)takePictureButtonPressed:(id)sender;
- (IBAction)settingsButtonPressed:(id)sender;
- (IBAction)cancelButtonPressed:(id)sender;
- (void)showContentsFromEvent:(Event *)_event;

@end
